﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace WebApi.Models
{
    /// <summary>
    /// 请求参数
    /// </summary>
    public class FKRequertParams
    {
        /// <summary>
        /// 流程名称
        /// </summary>
        public string ProcessName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string FormCode { get; set; }
        /// <summary>
        /// 代填人（登录人）
        /// </summary>
        public string LoginUserAccount { get; set; }
        /// <summary>
        /// 被代填人
        /// </summary>
        public string UserAccount { get; set; }

        /// <summary>
        /// 流程ID
        /// </summary>
        public string TaskID { get; set; }
        /// <summary>
        /// 非动态表单
        /// </summary>
        public NonCustomForm NonCustomForm { get; set; }
        /// <summary>
        /// 动态表单json
        /// </summary>
        public object CustomerForm { get; set; }
    }
    /// <summary>
    /// 非动态表单-主表
    /// </summary>

    public class MainCommon
    {
        /// <summary>
        /// 签署附件
        /// </summary>
        public string SignTheAttachment { get; set; }
        /// <summary>
        /// 申请人账号
        /// </summary>
        public string RequestUserAccount { get; set; }
        /// <summary>
        /// 申请人姓名
        /// </summary>
        public string RequestUser { get; set; }
        /// <summary>
        /// 申请人 Member 全路径
        /// </summary>
        public string RequestMemberFullName { get; set; }
        /// <summary>
        /// 申请人部门编码
        /// </summary>
        public string RequestDeptCode { get; set; }
        /// <summary>
        /// 申请人部门
        /// </summary>
        public string RequestDept { get; set; }
        /// <summary>
        /// 申请人职务
        /// </summary>
        public string RequsetPosition { get; set; }
        /// <summary>
        /// 直接上级用户账号
        /// </summary>
        public string RequsetSuperiorAccount { get; set; }
        /// <summary>
        /// 直接上级
        /// </summary>
        public string RequsetSuperior { get; set; }
        /// <summary>
        /// 申请日期
        /// </summary>
        public DateTime RequestDate { get; set; }
        ///// <summary>
        ///// 所属公司编码
        ///// </summary>
        //public string CompanyCode { get; set; }
        ///// <summary>
        ///// 所属项目编码
        ///// </summary>
        //public string ProjectCode { get; set; }
        ///// <summary>
        ///// 
        ///// </summary>
        //public string IsAEI { get; set; }
        /////// <summary>
        /////// 流程id
        /////// </summary>
        ////public string TaskID { get; set; }
        /// <summary>
        /// 流程名称
        /// </summary>
        public string ProcessName { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public string FormCode { get; set; }

        /// <summary>
        /// 常规true/非常规false
        /// 预算科目判断 4.*（除4.01、4.02、4.04） 为常规
        /// 2.*，4.01、4.02、4.04，6.*，8.* 非常规
        /// 如果多行明细的预算科目不一致，取非常规
        /// </summary>
        public bool IsRegular { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        public string BusinessTypeCode { get; set; }

        /// <summary>
        /// 是否超预算 true 超 ，false 不超
        /// </summary>
        public bool IsOutBudget { get; set; }

        /// <summary>
        /// 申请金额
        /// </summary>
        public decimal ApplyAmount { get; set; }

        /// <summary>
        /// 所属部门（不是法人公司！！！取名问题是历史原因）
        /// </summary>
        public string CompanyCode { get; set; }

        /// <summary>
        /// 所属项目
        /// </summary>
        public string ProjectCode { get; set; }

        /// <summary>
        /// IsAEI  true 是  ，fasle 否
        /// </summary>
        public bool IsAEI { get; set; } = false;

        /// <summary>
        /// 是否经过CEO通过审批
        /// </summary>
        public bool IsCEOApprove { get; set; }

        /// <summary>
        /// 通讯费是否超标  true  是， false 否
        /// </summary>
        public bool IsPhoneFeeOut { get; set; }

        /// <summary>
        /// 合同签署各方
        /// </summary>
        public List<string> ContractSignNames { get; set; }
        //public object ContractSignNames { get; set; }

        /// <summary>
        /// 付款单位
        /// </summary>
        public string Payer { get; set; }

        /// <summary>
        /// 付款单位是否需要盖章
        /// </summary>
        public bool PayerIsNeedSeal { get; set; }

        /// <summary>
        /// 是否标准合同 true 是，false 否
        /// </summary>
        public bool IsStandardContract { get; set; }

        /// <summary>
        /// 项目部负责人
        /// </summary>
        public List<string> ProjectLeader { get; set; }
        //public object ProjectLeader { get; set; }
        /// <summary>
        /// 法务部负责人
        /// </summary>
        public List<string> LegalLeader { get; set; }

        /// <summary>
        /// 是否需要行政部签署
        /// </summary>
        public bool IsNeedAD { get; set; }

        /// <summary>
        /// 人均招待费
        /// </summary>
        public decimal PerServe { get; set; }
        /// <summary>
        /// 高级董事总经理-市务及营运管理 已批
        /// </summary>
        public bool IsSeniorManagerApprove { get; set; }

        /// <summary>
        /// 报销code
        /// </summary>
        public int ReimburseCode { get; set; }

        /// <summary>
        /// 单据类型 0=个人单据，1=汇总单据
        /// </summary>
        public int FormType { get; set; }

        /// <summary>
        /// Is例外 1例外  0 无例外
        /// </summary>
        public int IsException { get; set; }
        /// <summary>
        /// 最大人均招待费
        /// </summary>

        public decimal MaxPerServe { get; set; }
        /// <summary>
        /// 承担主体名称 去重 逗号隔开,
        /// </summary>
        public string BudgetCenterNames { get; set; }

        /// <summary>
        /// 科目code去重 逗号隔开,
        /// </summary>
        public string BudgetItemCodes { get; set; }
        /// <summary>
        /// 动态表单
        /// </summary>
        public string DynamicForm { get; set; }


    }
    /// <summary>
    /// 非动态表单-明细表
    /// </summary>

    public class BudgetItem
    {
        /// <summary>
        /// 预算科目
        /// </summary>
        public string BudgetItemCode { get; set; }
        /// <summary>
        /// 预算额度
        /// </summary>
        public string BudgetAmount { get; set; }
    }
    /// <summary>
    /// 非动态表单
    /// </summary>
    public class NonCustomForm
    {
        /// <summary>
        /// 非动态表单-主表
        /// </summary>
        //[JsonProperty(PropertyName = "FlowFKMain")]
        public MainCommon MainCommon { get; set; }
        /// <summary>
        /// 非动态表单-明细表
        /// </summary>
        //[JsonProperty(PropertyName = "ID")]
        public List<BudgetItem> BudgetItems { get; set; }
    }
}